Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ZAP Go Package, Fix Generation Issues, and Autogenerate Interface #21

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

alessiodallapiazza
Copy link

Hello,

I would like to try the ZAP API, but I noticed that the Go package is not updated, which is discouraging for users who want to use it with Go. As a result, I decided to fork the repository and implement some updates and fixes. Here are the changes I made:

  • Readme Update:
    Updated the README file to reflect the latest changes and improvements.

  • Autogenerated Interface:
    Created a script to autogenerate the interface.go file to accommodate the updated interfaces.
    Ensured the interfaces reflect the current structure and functionality.

  • Folder Structure Changes:
    Adjusted the folder structure to align with the new generation process.

I hope these changes are helpful. Please let me know if there are any additional modifications or improvements needed.

Best regards,

@kingthorin
Copy link
Member

Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
Signed-off-by: Alessio Dalla Piazza <[email protected]>
@alessiodallapiazza
Copy link
Author

Hello,
I have addressed the DCO requirement by signing off the commits.

Comment on lines +25 to +27

zaproxy/
zap-extensions/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be removed, the repos should live at the same level as the zap-api-go not under it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we link these two projects as submodules instead? This way, users won't need to clone them manually into the correct location. I added them to the .gitignore file to ensure they are not committed accidentally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repos are already cloned, per dev guide.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong, why are they prefixed with zap-api-go now? Was that because of the clone under the repo?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might have been some changes in the generation script. I followed the instructions in the README and executed the commands using Gradle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case the instructions were not followed correctly.

@@ -1,264 +1,246 @@
// Zed Attack Proxy (ZAP) and its related class files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be kept.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface.go file is now automatically generated using a bash script. I will update the template to include the previous comments.

// limitations under the License.

// TODO: auto generate this file
// Package zap defines the interface a ZAP client should implement
package zap

// Interface defines the interface a ZAP client should implement
type Interface interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should still be sorted.

Copy link
Author

@alessiodallapiazza alessiodallapiazza Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will sort them in the bash script 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants